﻿using System;
using System.Linq;
using System.Threading.Tasks;

using Xc.DataAccess.Core;

namespace Xc.DataAccess.Protocoals.PcpChannels.Services
{
    /// <summary>
    /// 通道
    /// </summary>
    public interface IChannel
    {
        /// <summary>
        /// 发送数据
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<ResultData<byte[]>> Request(byte[] request, TimeSpan timeoutValue, Func<byte[], bool> validateCallBack);
        byte[] GetResponds(bool clear);
    }
}
